package com.kunsan.compose.compoents.room

import androidx.lifecycle.ViewModel
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow

class RoomViewModel : ViewModel() {

    private val _microphone = MutableStateFlow(true)
    val microphone: StateFlow<Boolean> get() = _microphone


    private val _camera = MutableStateFlow(true)
    val camera: StateFlow<Boolean> get() = _camera

    private val _speaker = MutableStateFlow(true)
    val speaker: StateFlow<Boolean> get() = _speaker


    fun updateAudioState(mute: Boolean) {
        _microphone.value = mute
    }

    fun updateVideoState(mute: Boolean) {
        _camera.value = mute
    }

    fun toggleSpeakerState(mute: Boolean) {
        _speaker.value = mute
    }
}